for $book1 in document("bib.xml")//book,
    $book2 in document("bib.xml")//book
where $book1/title = $book2/title
return
    $book1/title


